import axios from '@/utils/request'
/*
 * 获取验证码
 * @param {*} sid 唯一标识
 */
const getCode = (sid) => {
  return axios.get('/public/getCaptcha', {
    params: {
      sid: sid
    }
  })
}
const forget = option => {
  return axios.post('/login/forget', {
    ...option
  })
}
const login = (loginInfo) => {
  return axios.post('/login/login', {
    ...loginInfo
  })
}
const reg = (regInfo) => {
  return axios.post('/login/reg', {
    ...regInfo
  })
}
const reset = (info) => axios.post('/login/reset', { ...info })

export { getCode, forget, login, reg, reset }
